记录详情

Wrong Answer

/in/foo.cc: In function 'int read()':
/in/foo.cc:5:30: warning: suggest parentheses around '&&' within '||' [-Wparentheses]
  while(ch>'9'||ch<'0')ch=='-'&&(f=0)||(ch=getchar());
                       ~~~~~~~^~~~~~~
# 状态 耗时 内存占用
#1 Wrong Answer 1ms 204.0 KiB
#2 Wrong Answer 1ms 228.0 KiB
#3 Wrong Answer 2ms 220.0 KiB
#4 Wrong Answer 1ms 228.0 KiB
#5 Wrong Answer 1ms 208.0 KiB

代码

#include <bits/stdc++.h>
using namespace std;
inline int read(){
	int x=0,f=1;char ch=getchar();
	while(ch>'9'||ch<'0')ch=='-'&&(f=0)||(ch=getchar());
	while(ch<='9'&&ch>='0')x=(x<<3)+(x<<1)+ch-'0',ch=getchar();
	return f?x:-x;
}

int main() {
  int k = read(), n = read();

  int ans = 1;
  for (int i = 1; i <= n; ++ i) {
    ans = (long long) ans * (k + 1) % 1000000007;
  }
  printf("%d\n", ans);
}

信息

递交者
类型
递交
题目
P1005 hitwh 2019 新生赛 F Ramen and his faculty
语言
C++
递交时间
2020-12-17 10:54:59
评测时间
2020-12-17 13:15:13
评测机
分数
0
总耗时
9ms
峰值内存
228.0 KiB