竞赛
考级
#include <bits/stdc++.h> using namespace std; void baron(int a,int b){ int x=2; long long day=pow(a,b); cout<<day%7; } int main(){ int a,b; cin>>a>>b; baron(a,b); }
琮
绝对不用函数
cat
AC
荷取青
不会的都看我! 100%AC! 点个关注!
信奥--小潘 CPZT ACGO
YuQing1919
https://www.gnomic.cn/agentChat/index?ax(CHATGPT4.0)
钱某
代码复杂度: O(n) 这题目很"简单" 90tps: 错了??? ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ 原来没有考虑ans被7整除时输出为0的情况! 100tps: // A7852 AC
金刚石
JMZ詹总
立羽不是福瑞控
星舰♈
对方正在输入...
#include <bits/stdc++.h> using namespace std; void dog(int a,int b){ long long x=pow(a,b); int y=x%7; if(y==0) cout<<7; else cout<<y; } int main(){ int n; int m; cin>>n>>m; dog(n,m); return 0; }
精神小伙zzy
黑客_天之神_ZDZL_zsy
???
枫岚
#include<bits/stdc++.h> using namespace std; int a,b; long long sum; int main(){ cin >> a >> b; sum = pow(a,b); if(sum <= 7){ cout << sum; }else{ if(sum % 7 == 0){ cout << "7"; }else{ cout << sum % 7; } } return 0; }
明煦